<?php
require_once $_SERVER["DOCUMENT_ROOT"].'/service/service_include.php';
//实例化SOAP服务
$server = new SoapServer(null, //non-WSDL模式，不指定WSDL文件
        array('uri' => 'login.yufeikj.com','soap_version' => SOAP_1_2));
//注册提供外部调用的方法
$server->addFunction('loginHandleService');
//可以注册方法，也可以注册类：
//$server->setClass("class name");
$server->handle();

// 注册方法的实现,有参数
function loginHandleService ($userLoginId, $password)
{
    $condition = array("userPwd" => $password, "userLoginId" => $userLoginId);
    tsLoad('/manage/busi/SysUserBusi.class.php');
    $sysUserBusi = new SysUserBusi();
    $result = $sysUserBusi->loginSysUser($condition);
    
    global $mysqlTools,$conn;
    $mysqlTools->closeConnect($conn);
    if($result == 'success')
        return $_SESSION['userInfo'];
    else
        return false;
}
exit();
?>